package net.tooeye.easymes.activities;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ArrayAdapter;

import net.tooeye.easymes.common.BaseActivity;
import net.tooeye.easymes.components.ReLoadListView;
import net.tooeye.easyplus.R;

public class MoctaActivity extends BaseActivity implements ReLoadListView.ILoadListener {


    private ReLoadListView reLoadListView;

    private int count;    //记录总数
    private int currentPage = 1; //当前页
    private int limit = 10; //页大小

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_mocta);
        reLoadListView = findViewById(R.id.reloadListview);
        reLoadListView.setInterface(this);
        String[] data = {"1","2","1","2","1","2","1","2","1","2","1","2","1","2"};
        ArrayAdapter<String> adapter = new ArrayAdapter<>(this,R.layout.list_item_sfcta,data);
        reLoadListView.setAdapter(adapter);
    }

    @Override
    public void onLoad() {

        String[] data = {"abc","cde","abc","cde","abc","cde","abc","cde","abc","cde","abc","cde","abc","cde"};
        ArrayAdapter<String> adapter = new ArrayAdapter<>(this,R.layout.list_item_sfcta,data);
        reLoadListView.setAdapter(adapter);
        reLoadListView.loadComplete();
    }
}
